package phi.engine.input
{
	public class KeyboardState
	{
		protected var keys :Array = [];
		
		public function KeyboardState( keys :Array )
		{
			this.keys = keys;
		}
		
		public function isKeyDown( keyCode :Number ):Boolean
		{
			return keys[ keyCode ]; 
		}
		
		public function isKeyUp( keyCode :Number ):Boolean
		{
			return keys[ keyCode ] == false;
		}
		
		public function clone():KeyboardState
		{
			return new KeyboardState( keys.concat() );
		}
	}
}